<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="Pragma" content="no-cache" />
		<meta http-equiv="Cache-Control" content="no-cache" />
		<meta http-equiv="Expires" content="0" />
		<title>品质从此无忧-麦丰网</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="format-detection" content="telephone=no">
		<link rel="stylesheet" href="/app/styles/base.css">
		<link rel="stylesheet" href="/common/css/slider/slider.css">
		<link rel="stylesheet" href="/common/css/slider/slider.default.css">
		<link rel="stylesheet" href="/common/css/zmu.css">
		<link rel="stylesheet" href="/app/styles/leader.css">

		<script type="text/javascript" src="/common/js/zepto.js"></script>
		<script type="text/javascript" src="/common/js/zmu.js"></script>
		<script type="text/javascript" src="/common/js/slider/slider.js"></script>
		<script type="text/javascript" src="/common/js/slider/dots.js"></script>
		<script type="text/javascript" src="/common/js/slider/$touch.js"></script>
		<script type="text/javascript" src="/common/js/slider/$autoplay.js"></script>
		<script type="text/javascript" src="/common/js/slider/$lazyloadimg.js"></script>
		<script type="text/javascript" src="/app/scripts/common_lib.js"></script>
<style type="text/css">
table {
	width: 100%;
}

table td {
	border-bottom-style: dashed;
	border-bottom-color: gray;
	border-bottom-width: 1px;
	padding: 4px;
}

table thead td{
	line-height:18px;
	font-weight: bold;
	padding-top: 10px;
	font-size: 16px;
}
</style>		
</head>

<body>
	<div class="div-header">
		<ul>
			<li id="name">账户详情</li>
			<li id="user" onclick="location.href='/'"></li>
		</ul>
	</div>
	
	<div class = "div-content">
		<div class="div-section">
			<font><strong>您拥有的现金券：</strong></font>
			<table style="width: 100%;">
				<thead>
					<tr>
						<td>金额(元)</td>
						<td>有效期</td>
					</tr>
				</thead>
				<tbody id="ticket-list">
					<tr id="ticket-list-empty" style="display: none;">
						<td colspan="2">您当前没有的现金券。</td>
					</tr>
				</tbody>
			</table>
			<div id="ticket-list">
				<div >
				
				</div>
			</div>
		</div>
	</div>
	
	<footer>
		<div class="footerWrap">
			<iframe src="/mobile/footer.html" style="padding: 0;margin: 0;width: 100%;height: 100%;" width="100%" height="100%" scrolling="no" frameborder="0"></iframe>
		</div>
	</footer>
	<div style="height: 50px;"></div>
	
	<div class="bottom">
		<div class="bottomWrap">
			<iframe src="/mobile/bottom.html" style="padding: 0;margin: 0;width: 100%;height: 100%;" width="100%" height="100%" scrolling="no" frameborder="0"></iframe>
		</div>
	</div>
</body>
	
<script type="text/javascript">
	$(document).ready(function() {
		cjl.getTitle();
		//getAccountDetail();
	});
	
	function getAccountDetail() {
		var url = "/service/account";
		cjl.get(url, {}, function(body) {
			var account = body.account;
			//$("#ticket-list").empty();
			if(ticketList.length <= 0) {
				$("#ticket-list-empty").show();
			}
			for(var o in ticketList) {
				var ticket = ticketList[o];
				var html = '';
				html += '<tr>';
				html += '<td>'+ticket.amount.toFixed(2)+'</td>';
				html += '<td>'+cjl.formatTime(ticket.deadline,"yyyy-MM-dd")+'</td>';
				html += '</tr>'
				$("#ticket-list").append(html);
			}
			
			var html = '';
			html += '<tr>';
			html += '<td>总共：'+ticketTotalAmount.toFixed(2)+'</td>';
			html += '<td></td></tr>';
			$("#ticket-list").append(html);
		});
	}
</script>
</html>
